package com.example.demo3.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo3.entity.Employee;
import com.example.demo3.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface UserMapper extends BaseMapper<Employee> {
    @Select(value = "select * from sys_user where usr_name=#{userName} and usr_password=#{userPassword}")
    public User findByNameAndPassword(@Param("userName") String userName,@Param("userPassword")  String userPassword);

    @Select(value = "select * from sys_user ")
    public List<User> find();


}
